export function arrayUnique(arr, name) {
  var hash = {}
  return arr.reduce(function (item, next) {
    hash[next[name]] ? '' : (hash[next[name]] = true && item.push(next))
    return item
  }, [])
}

export function test(List1, List2) {
  const a = List1.map(item => JSON.stringify(item))
  const b = List2.map(item => JSON.stringify(item))

  return a
    .concat(b)
    .filter(v => !a.includes(v) || !b.includes(v))
    .map(item => JSON.parse(item))
}
